from django.shortcuts import render, redirect


def check_login(func):
    def inner(*args, **kwargs):
        if args[0].session.get("user_session"):
            return func(*args, **kwargs)
        else:
            return redirect("/user/login")

    return inner

# Create your views here.
@check_login
def home(request):
    return render(request,"home/home.html")